package com.xuecheng.content.api;

import com.xuecheng.commons.model.vo.ResponseResult;
import com.xuecheng.commons.model.vo.CoursePubVo;
import com.xuecheng.commons.model.vo.TeachplanVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author HuangYuwu
 * @CreateTime 2022/9/15 02:00
 */
@FeignClient("xc-content-service")
public interface ContentClient {
    /**
     * 根据id查询课程发布
     * @param id
     * @return
     */
    @GetMapping("/coursePub/{id}")
    public ResponseResult<CoursePubVo> findById(@PathVariable("id") Long id);

    /**
     * 根据id查询课程计划
     * @param teachplanId
     * @return
     */
    @GetMapping("/teachplan/{teachplanId}")
    public ResponseResult<TeachplanVo> findTeachplanById(@PathVariable("teachplanId")Long teachplanId);
}
